]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: Ensure timed login indicator is hidden on key presses
authorverdre <gitlab@v0yd.nl>
Tue, 17 Apr 2018 12:30:05 +0000 (14:30 +0200)
committerverdre <gitlab@v0yd.nl>
Thu, 19 Apr 2018 07:08:45 +0000 (09:08 +0200)
The timed login feature currently cancels the timed login operation when
a user presses a key but, oddly, only hides the indicator when the user
releases the key. This means that if a user holds down a key that
doesn't key repeat, the timed login indicator will continue to run after
the timed login operation is cancelled.

This commit address the problem by ensuring the timed login indicator is
hidden on any key press event, at the same time the timed login
operation is canceled.

js/gdm/loginDialog.js

index 4a93545af859db5348038c6fa3f7d7bc62936bb0..3470bf7498adfcddb2856d381978d52eb6ad4426 100644 (file)
@@ -1073,18 +1073,13 @@ var LoginDialog = new Lang.Class({
     _onTimedLoginRequested(client, userName, seconds) {
         this._startTimedLogin(userName, seconds);
 
+        // Restart timed login on user interaction
         global.stage.connect('captured-event', (actor, event) => {
            if (this._timedLoginDelay == undefined)
                return Clutter.EVENT_PROPAGATE;
 
            if (event.type() == Clutter.EventType.KEY_PRESS ||
                event.type() == Clutter.EventType.BUTTON_PRESS) {
-               if (this._timedLoginBatch) {
-                   this._timedLoginBatch.cancel();
-                   this._timedLoginBatch = null;
-               }
-           } else if (event.type() == Clutter.EventType.KEY_RELEASE ||
-                      event.type() == Clutter.EventType.BUTTON_RELEASE) {
                this._resetTimedLogin();
            }